<template>
    <div class="con">
        <div class="text">
            <p v-show="show">暂未添加支付宝</p>
            <p v-show="!show">
                <img src="../../assets/images/home/zfb.png" alt="">
                {{accountNo}}</p>
        </div>
       
    
      
    </div>
</template>

<script>
export default {
    name: "myAlipay",
    data() {
        return {
            timestamp: "",
            accountNo: "",
            show:false
        };
    },

    methods: {
    
    },
    mounted() {
        this.timestamp = Date.parse(new Date());
           this.axios({
            method: "post",
            url: `${this.siteUrl}/app/account/repay/getLastCredit?appid=web.2019&format=json&timestamp=${this.timestamp}`,
            data: {
                userId: localStorage.getItem("userId"),
                type: 2
            }
        })
            .then(response => {
                console.log(response);
                if (response.data.success == 1) {
                    if (response.data.data.accountNo == "") {
                        this.show = true;
                    }else{
                        this.accountNo=response.data.data.accountNo;
                        
                    }
                }
            })
            .catch(error => {
                console.log(error);
                this.$toast("连接服务器异常");
            });
    }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.con {
    width: 100%;
    min-height: 100vh;
    background: #f9f9f9;
    overflow: hidden;
}

.text{
    width: 100%;
    margin-top: 10px;
    height: 50px;
    background: #fff;
    text-indent: 10px;
}
.text p{
   line-height: 50px;
}
.text p img{
    width: 20px;
    vertical-align: middle
}


</style>
